#ifndef __MYSOCKETCLIENT_INTERFACE_H__
#define __MYSOCKETCLIENT_INTERFACE_H__

#include "iotgo_platformAPI.h"

#define MYSOCKETCLIENT_SUCCESS        0
#define MYSOCKETCLIENT_NOT_FINISHED  -1
#define MYSOCKETCLIENT_FAIL          -2
#define MYSOCKETCLIENT_CLOSED        -3
#define MYSOCKETCLIENT_OVERTIME      -4

typedef struct mySocketClient_interface MySocketClient;

extern MySocketClient *setupSocketClient(uint8_t *server_ip,uint32_t server_port);
extern int8_t cleanSocketClient(MySocketClient **pp_mysocket);
extern int8_t connectToServer(MySocketClient *p_mysocket);
extern int32_t readFromServer(MySocketClient *p_mysocket,uint8_t *buf, uint32_t len);
extern int32_t readFromServerNonBlock(MySocketClient *p_mysocket,uint8_t *buf, uint32_t len);
extern int32_t writeToServer(MySocketClient *p_mysocket,uint8_t *buf, uint32_t len);
extern int32_t writeToServerDebug(MySocketClient *p_mysocket,uint8_t *buf, uint32_t len);

#endif
